3.4 \(\int \cosh (a+b x^2) \, dx\)

Optimal. Leaf size=53 \[ \frac {\sqrt {\pi } e^{-a} \text {erf}\left (\sqrt {b} x\right )}{4 \sqrt {b}}+\frac {\sqrt {\pi } e^a \text {erfi}\left (\sqrt {b} x\right )}{4 \sqrt {b}} \]

[Out]

1/4*erf(x*b^(1/2))*Pi^(1/2)/exp(a)/b^(1/2)+1/4*exp(a)*erfi(x*b^(1/2))*Pi^(1/2)/b^(1/2)

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 53, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 8, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.375, Rules used = {5299, 2204, 2205} \[ \frac {\sqrt {\pi } e^{-a} \text {Erf}\left (\sqrt {b} x\right )}{4 \sqrt {b}}+\frac {\sqrt {\pi } e^a \text {Erfi}\left (\sqrt {b} x\right )}{4 \sqrt {b}} \]

Antiderivative was successfully verified.

[In]

Int[Cosh[a + b*x^2],x]

[Out]

(Sqrt[Pi]*Erf[Sqrt[b]*x])/(4*Sqrt[b]*E^a) + (E^a*Sqrt[Pi]*Erfi[Sqrt[b]*x])/(4*Sqrt[b])

Rule 2204

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erfi[(c + d*x)*Rt[b*Log[F], 2
]])/(2*d*Rt[b*Log[F], 2]), x] /; FreeQ[{F, a, b, c, d}, x] && PosQ[b]

Rule 2205

Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[(F^a*Sqrt[Pi]*Erf[(c + d*x)*Rt[-(b*Log[F]),
 2]])/(2*d*Rt[-(b*Log[F]), 2]), x] /; FreeQ[{F, a, b, c, d}, x] && NegQ[b]

Rule 5299

Int[Cosh[(c_.) + (d_.)*(x_)^(n_)], x_Symbol] :> Dist[1/2, Int[E^(c + d*x^n), x], x] + Dist[1/2, Int[E^(-c - d*
x^n), x], x] /; FreeQ[{c, d}, x] && IGtQ[n, 1]

Rubi steps

\begin {align*} \int \cosh \left (a+b x^2\right ) \, dx &=\frac {1}{2} \int e^{-a-b x^2} \, dx+\frac {1}{2} \int e^{a+b x^2} \, dx\\ &=\frac {e^{-a} \sqrt {\pi } \text {erf}\left (\sqrt {b} x\right )}{4 \sqrt {b}}+\frac {e^a \sqrt {\pi } \text {erfi}\left (\sqrt {b} x\right )}{4 \sqrt {b}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 45, normalized size = 0.85 \[ \frac {\sqrt {\pi } \left ((\cosh (a)-\sinh (a)) \text {erf}\left (\sqrt {b} x\right )+(\sinh (a)+\cosh (a)) \text {erfi}\left (\sqrt {b} x\right )\right )}{4 \sqrt {b}} \]

Antiderivative was successfully verified.

[In]

Integrate[Cosh[a + b*x^2],x]

[Out]

(Sqrt[Pi]*(Erf[Sqrt[b]*x]*(Cosh[a] - Sinh[a]) + Erfi[Sqrt[b]*x]*(Cosh[a] + Sinh[a])))/(4*Sqrt[b])

________________________________________________________________________________________

fricas [A]  time = 0.46, size = 49, normalized size = 0.92 \[ -\frac {\sqrt {\pi } \sqrt {-b} {\left (\cosh \relax (a) + \sinh \relax (a)\right )} \operatorname {erf}\left (\sqrt {-b} x\right ) - \sqrt {\pi } \sqrt {b} {\left (\cosh \relax (a) - \sinh \relax (a)\right )} \operatorname {erf}\left (\sqrt {b} x\right )}{4 \, b} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(b*x^2+a),x, algorithm="fricas")

[Out]

-1/4*(sqrt(pi)*sqrt(-b)*(cosh(a) + sinh(a))*erf(sqrt(-b)*x) - sqrt(pi)*sqrt(b)*(cosh(a) - sinh(a))*erf(sqrt(b)
*x))/b

________________________________________________________________________________________

giac [A]  time = 0.11, size = 41, normalized size = 0.77 \[ -\frac {\sqrt {\pi } \operatorname {erf}\left (-\sqrt {b} x\right ) e^{\left (-a\right )}}{4 \, \sqrt {b}} - \frac {\sqrt {\pi } \operatorname {erf}\left (-\sqrt {-b} x\right ) e^{a}}{4 \, \sqrt {-b}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(b*x^2+a),x, algorithm="giac")

[Out]

-1/4*sqrt(pi)*erf(-sqrt(b)*x)*e^(-a)/sqrt(b) - 1/4*sqrt(pi)*erf(-sqrt(-b)*x)*e^a/sqrt(-b)

________________________________________________________________________________________

maple [A]  time = 0.08, size = 40, normalized size = 0.75 \[ \frac {\erf \left (x \sqrt {b}\right ) \sqrt {\pi }\, {\mathrm e}^{-a}}{4 \sqrt {b}}+\frac {{\mathrm e}^{a} \sqrt {\pi }\, \erf \left (\sqrt {-b}\, x \right )}{4 \sqrt {-b}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(b*x^2+a),x)

[Out]

1/4*erf(x*b^(1/2))*Pi^(1/2)*exp(-a)/b^(1/2)+1/4*exp(a)*Pi^(1/2)/(-b)^(1/2)*erf((-b)^(1/2)*x)

________________________________________________________________________________________

maxima [B]  time = 0.32, size = 87, normalized size = 1.64 \[ -\frac {1}{4} \, b {\left (\frac {2 \, x e^{\left (b x^{2} + a\right )}}{b} + \frac {2 \, x e^{\left (-b x^{2} - a\right )}}{b} - \frac {\sqrt {\pi } \operatorname {erf}\left (\sqrt {b} x\right ) e^{\left (-a\right )}}{b^{\frac {3}{2}}} - \frac {\sqrt {\pi } \operatorname {erf}\left (\sqrt {-b} x\right ) e^{a}}{\sqrt {-b} b}\right )} + x \cosh \left (b x^{2} + a\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(b*x^2+a),x, algorithm="maxima")

[Out]

-1/4*b*(2*x*e^(b*x^2 + a)/b + 2*x*e^(-b*x^2 - a)/b - sqrt(pi)*erf(sqrt(b)*x)*e^(-a)/b^(3/2) - sqrt(pi)*erf(sqr
t(-b)*x)*e^a/(sqrt(-b)*b)) + x*cosh(b*x^2 + a)

________________________________________________________________________________________

mupad [F]  time = 0.00, size = -1, normalized size = -0.02 \[ \int \mathrm {cosh}\left (b\,x^2+a\right ) \,d x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(cosh(a + b*x^2),x)

[Out]

int(cosh(a + b*x^2), x)

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \cosh {\left (a + b x^{2} \right )}\, dx \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(cosh(b*x**2+a),x)

[Out]

Integral(cosh(a + b*x**2), x)

________________________________________________________________________________________